package com.itheima.test3;

import java.util.ArrayList;
import java.util.Random;

public class Test {
    public static void main(String[] args) {
        Random r = new Random();
        ArrayList<Integer> list = new ArrayList<>();
        int count = 0;
        while (count < 6) {
            int num = r.nextInt(33) + 1;
            if (list.contains(num)) {
                continue;
            } else {
                list.add(num);
                count++;
            }
        }

        int lastNum = r.nextInt(16) + 1;
        list.add(lastNum);
        for (int i : list) {
            System.out.print(i + " ");
        }
    }

}
